﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OrderRecords.aspx.cs" Inherits="WebApp.Space.AccountInfo.OrderRecords" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../css/css2.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div class="hy_right1a">
        <div class="hy_right2a">
            <div class="hy_r2p">
                <div class="r2_p1">
                    我的订单
                </div>
            </div>
            <div class="hy_r2p1a">
                <asp:ListView ID="lvOrders" runat="server"
                    onpagepropertieschanged="lvOrders_PagePropertiesChanged" 
                    onitemcommand="lvOrders_ItemCommand" 
                    onitemdatabound="lvOrders_ItemDataBound">
                    <LayoutTemplate>
                        <div class="hy_bta">
                            <ul>
                                <li>订单编号</li>
                                <li>下单日期</li>
                                <li>收货人</li>
                                <li>付款方式</li>
                                <li>总金额</li>
                                <li>使用积分</li>
                                <li>状态</li>
                                 <li>查看详情</li>
                                <li>操作</li>
                            </ul>
                        </div>
                        <div class="hy_lista">
                            <ul>
                                <asp:PlaceHolder ID="itemPlaceholder" runat="server" />
                            </ul>
                        </div>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <li>
                            <div class="hy_item1a">
                                <%#Eval("OrderNum")%></div>
                            <div class="hy_item2a">
                                <%#Convert.ToDateTime(Eval("CreateTime")).ToString("yyyy-MM-dd")%></div>
                            <div class="hy_item3a">
                                <%#GetUserNameById(Eval("UserId").ToString())%></div>
                            <div class="hy_item4a">
                                <%#Eval("PayType")%></div>
                            <div class="hy_item5a">
                                <%#Convert.ToDecimal(Eval("allprice"))%></div>
                            <div class="hy_item6a">
                                <%#Convert.ToDecimal(Eval("UseIntegral"))%>
                            </div>
                            <div class="hy_item7a">
                               <asp:Literal ID="litState" Text=' <%#Eval("State")%>' runat="server"></asp:Literal></div>
                            <div class="hy_item8a">
                                <a href='<%# "ShowOrderList.aspx?oNum=" + Eval("OrderNum") %>' target="_blank">
                                    <img src="../../imagesWeb/newbtn_detail.gif" />
                                </a>
                            </div>
                            <div class="hy_item9a">
                            <p>
                                <asp:LinkButton ID="LinkButton1" CommandName="OnDel" CommandArgument=' <%#Eval("OrderId")%>' runat="server">删除</asp:LinkButton>
                            </p>
                             <p>
                                <asp:LinkButton ID="LinkButton2" CommandName="refund" CommandArgument=' <%#Eval("OrderId")%>' runat="server">申请退款</asp:LinkButton>
                            </p>
                             <p>
                                <asp:LinkButton ID="LinkButton3" CommandName="OnPay" CommandArgument=' <%#Eval("OrderId")%>' runat="server">支付订单</asp:LinkButton>
                            </dp>  
                          </div>
                        </li>
                    </ItemTemplate>
                </asp:ListView>
            </div>
            <div class="digg">
                <asp:DataPager ID="DataPager1" runat="server" PagedControlID="lvOrders" PageSize="12">
                    <Fields>
                        <asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="False" ShowNextPageButton="False"
                            ShowPreviousPageButton="True" PreviousPageText="上一页" />
                        <asp:NumericPagerField ButtonType="Link" />
                        <asp:NextPreviousPagerField ButtonType="Link" ShowLastPageButton="False" ShowNextPageButton="True"
                            ShowPreviousPageButton="False" NextPageText="下一页" />
                    </Fields>
                </asp:DataPager>
                <%--<span class="disabled">上一页</span><span class="current">1</span> <a href="#?page=2"
                    _fcksavedurl="#?page=2">2</a> <a href="#?page=3" _fcksavedurl="#?page=3">3</a>
                <a href="#?page=2" _fcksavedurl="#?page=2">下一页 </a>--%>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
